#include "mainwindow.h"

#include<iostream>
#include "./ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_2_clicked()
{
    this->close();
}


void MainWindow::on_checkBox_checkStateChanged(const Qt::CheckState &arg1)
{
    if(arg1 == Qt::Checked){

        std::cout<< "checked" <<std::endl;
        this->close();

    }

}




void MainWindow::on_buttonBox_accepted()
{
    this->close();
}


void MainWindow::on_checkBox_2_checkStateChanged(const Qt::CheckState &arg1)
{
    if(arg1 == 0){
        std::cout<< "checked" <<std::endl;
        this->close();

    }
}


void MainWindow::on_comboBox_currentIndexChanged(int index)
{
    if(index == 1){
        std::cout<< "2" <<std::endl;
        this->close();

    }
}


void MainWindow::on_checkBox_stateChanged(int arg1)
{
    if(arg1 == 0){
        std::cout<< "0" <<std::endl;
       // this->close();

    }
    else if(arg1 == 2){
        std::cout<< "1" <<std::endl;
        // this->close();

    }
}

